<?php
// +----------------------------------------------------------------------
// | 跃飞 [ 将来的你一定会感激现在奋斗的自己 ]
// +----------------------------------------------------------------------
// | Author: 钟贵廷
// +----------------------------------------------------------------------
// | URI1: https://gitee.com/yeafy   URI2:https://github.com/gtzhong
// +----------------------------------------------------------------------
// | weChat:gt845272922  qq:845272922
// +----------------------------------------------------------------------

namespace app\yeafy\observer\demo1;

/**
 * 描述:主题，用于管理监听的观察者，实现数据更新时对他们的通知
 * @author 钟贵廷
 * @WeChat gt845272922
 * @qq 845272922
 * Interface Subject
 * @package app\yeafy\observer\demo1
 */
interface ISubject
{
    /**
     * 描述:注册观察者
     * @author 钟贵廷
     * @WeChat gt845272922
     * @qq 845272922
     * @return mixed
     */
    public function registerObserver(IObserver $observer);

    /**
     * 描述:删除观察者
     * @author 钟贵廷
     * @WeChat gt845272922
     * @qq 845272922
     * @return mixed
     */
    public function removeObserver(IObserver $observer);

    /**
     * 描述:通知观察者
     * @author 钟贵廷
     * @WeChat gt845272922
     * @qq 845272922
     * @return mixed
     */
    public function notifyObserver();
}